-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawer toggle a11y rebase #1032
Open
kimisgold
wants to merge
29
commits into
master
Choose a base branch
from
drawer-toggle-a11y-rebase
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Use actual buttons for toggles and actions. * Improve button and input labels for screen readers. * Make drawer markup more consistent. * Consolidate drawer js.
* Drawer toggles and remove actions are buttons. * Improved aria labeling for drawer actions. * Pull navigation link edit markup out into a partial for more legible management.
The js now covers toggling drawer contents and both delete and undo. The "data-action-selector" attribute tells the js what selector to toggle on relevant drawer components.
* Reduce redundancy in updateDeleteButtons. Most of it is now handled in the shared manageDrawers function in globals.js. * Manage display of 'remove/undo' buttons in the partial.
The way the partial was iterating resulted in duplicate ids.
New links were previously inserted into the navigation via the javascript using separate markup. This allows us to manage consistent markup for both new and existing navigation links. The form will include an empty version of this partial as a template, then the javascript clones and populates the template with new link data.
This allows the drawer javascript to listen to a larger container for clicks on the drawer buttons. Previously on forms that add new drawers, the new drawers would not get all the proper behaviors bound.
It's already called in edit-navigation.php.
* The form has an empty navigation link partial marked '.template'. The js clones the template and populates it with the relevant values. * Omeka.Navigation.populateNewNavLinkAttributes() exists because there are so many attributes to update to keep the new links screen reader friendly, alongside submitting properly. * The visit buttons are now actual buttons instead of links. The js has been updated accordingly. * The add new link form now shows required field alerts if not filled out properly. * Upon adding a new field, screen readers will read a success message that includes the total number of links on the form. * Instances of '.main_link' selectors have been updated to '#navigation_main_list .main_link' to avoid picking up empty template values.
Buttons are buttons now.
It is confusing for identical "remove" buttons to perform differently on the same form.
The controller now sends the temporary element id to the partials, which can then be referenced in other uses of aria-labelledby.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your rebase seems to keep everything from the original branch (#995). I'll include the original description here too.
This pull request consolidates multiple uses of the "drawer" pattern where a component can collapse and expand, and often be marked for removal or be dragged to create order. It also does the following: